package com.test.consumer.model;

/**
 * @Title:定义的默认消息
 * @Description:
 * @Author:jiangdabin
 * @Since:2018年4月26日 上午10:08:26
 * @Copyright:Copyright (c) 2018 - 2100
 * @Company:gome
 * @Version:1.1.0
 */

public class MessageCode {
    public final static MessageCode SUCCESS = new MessageCode(true, "0000", "操作成功");
    
    public final static MessageCode FAILED = new MessageCode(false, "1000", "操作失败");
    
    public final static MessageCode DATA_LONG = new MessageCode(false, "1001", "输入内容超过限制");
    
    public final static MessageCode EMPTY = new MessageCode(false, "1002", "未收到请求信息");
    
    public final static MessageCode PARAMS_EXCEPTION = new MessageCode(false, "1003", "参数格式不正确");
    
    public final static MessageCode WAYBILL_SMS_POD_ERROR = new MessageCode(false, "1005", "短信回执码输入不正确");
    
    public final static MessageCode USER_PASSWORD_ERROR = new MessageCode(false, "0501", "用户名或密码错误");
    
    public final static MessageCode NOT_FUND_USER = new MessageCode(false, "0502", "未找到该用户");
    
    public final static MessageCode NOT_AUTH = new MessageCode(false, "0503", "您没有访问权限，请申请权限");
    
    public final static MessageCode LOGIN_EXPIRED = new MessageCode(false, "0504", "登录已过期，请重新登录");
    
    public final static MessageCode LOGIN_OTHER_DEVICES = new MessageCode(false, "0505", "已在其它设备登录");
    
    public final static MessageCode LOGIN_ERROR = new MessageCode(false, "0506", "单点证登录失败");
    public final static MessageCode TOKEN_ERROR = new MessageCode(false, "0507", "无效的token");
    
    public final static MessageCode RUNTIME_ERROR = new MessageCode(false, "0402", "请求超时");
    
    public final static MessageCode BOTTOM_SERVICE_EXCEPTION = new MessageCode(false, "0403", "服务异常");
    
    public final static MessageCode BOTTOM_SERVICE_NOT_FOUND= new MessageCode(false, "0404", "服务没有找到");
    
    public final static MessageCode UNKNOWN_EXCEPTION = new MessageCode(false, "1111", "未知异常");
    
    public final static MessageCode PARAMS_DATE_FORMAT_ERROR = new MessageCode(false, UNKNOWN_EXCEPTION.getCode(), "日期格式不正确");
    
    public final static MessageCode SENDED_SMS = new MessageCode(false, "1004", "验证码已发送，请勿重复操作");
    
    public final static MessageCode WAYBILL_UNKNOWN_EMPTY = new MessageCode(false, EMPTY.getCode(), "任务号不能为空");
    public final static MessageCode WAYBILL_NO_UNKNOWN_EMPTY = new MessageCode(false, EMPTY.getCode(), "运单号不能为空");
    
    public final static MessageCode WAYBILL_NOT_FUN = new MessageCode(false, EMPTY.getCode(), "未查询到任务");
    public final static MessageCode WAYBILL_NOT_FUN_TASKNO = new MessageCode(false, EMPTY.getCode(), "未查询到运单号相关的任务");
    
    public final static MessageCode WAYBILL_NOT_PAY = new MessageCode(false, "0701", "任务还未支付");
    
    public final static MessageCode WAYBILL_NOT_FUND_PAY = new MessageCode(false, "0702", "未找到需要支付的任务");
    
    private boolean success = false;
    
    private String code;
    
    private String message;
    
    private MessageCode(boolean success, String code, String message) {
        this.code = code;
        this.message = message;
        this.success = success;
    }
    
    /**
     * @return the code
     */
    
    public String getCode() {
        return code;
    }
    
    /**
     * @param code the code to set
     */
    
    public void setCode(String code) {
        this.code = code;
    }
    
    /**
     * @return the message
     */
    
    public String getMessage() {
        return message;
    }
    
    /**
     * @param message the message to set
     */
    
    public void setMessage(String message) {
        this.message = message;
    }
    
    /**
     * @return the success
     */
    
    public boolean getSuccess() {
        return success;
    }
    
}
